import * as request from "request"

export async function aRequest(options:any):Promise<request.Response>{
    return new Promise((resolve,reject)=>{
        let url = options.url;
        request(url,options, function (error:any, response:any) {
            if (error) {return reject(new Error(error))};
            return resolve(response)
        });
    })
}
